package com.jicheng.mapper.template;

import com.jicheng.entity.task.template.item.SupervisionAndInspectionItem;
import com.jicheng.framework.mybatis.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface SupervisionAndInspectionMapper extends BaseMapper<SupervisionAndInspectionItem> {
    @Select("select count(1) from tb_jdjc_supervision_inspection where id = #{id}")
    int isExist(@Param("id") String id);


    /**
     * 删除，采取逻辑删除
     * @param where
     * @param id
     */
    @Update("update tb_jdjc_supervision_inspection set deleted = 1 where ${where} = #{id}")
    void del(@Param("where") String where, @Param("id") String id);

}
